Combining Kanzi Studio projects into a Kanzi application

You can combine the content of several Kanzi Studio projects into a single Kanzi application. This enables you to:

For example, when you are developing an in-vehicle infotainment application consisting of several applications, you can develop each of these applications in one or more Kanzi Studio projects. You then use one Kanzi application to combine these Kanzi Studio projects into a single Kanzi application.

To combine Kanzi Studio projects into a single Kanzi application:

Learn how to combine content from Kanzi Studio projects by completing a tutorial. See Tutorial: Combine Kanzi Studio projects into a single Kanzi application.

Kanzi solution structure

A Kanzi solution is a Kanzi application which you use to combine Kanzi applications into a single Kanzi application.

When you create a Kanzi solution, use these guidelines:

When you add Kanzi Studio projects to a Kanzi solution, use these guidelines:

Using prefabs and resources from Kanzi Studio projects

To use prefabs and resources from Kanzi Studio projects:

  1. Open or create a Kanzi Studio project in which you want to use content from other Kanzi Studio projects.
  2. In the Library press Alt and right-click Project References, select Existing Project, select a Kanzi Studio project from which you want to use content in the target project, and click Open.
  3. In the Library > Project References select the project reference you created in the previous step.
    TIP

    You can open a referenced project in a new instance of Kanzi Studio by double-clicking the project name in the Project References library.

  4. In the Properties double-click the kzb file URL of the prefab or resource you want to use from that project, right-click, and select Copy.
    You use the kzb URLs to access the content from another project.
  5. Use the content from the referenced project:
  6. (Optional) Customize and control the appearance of prefabs. See Customizing and controlling prefabs from Kanzi Studio projects.

Using prefabs and resources from kzb files

To use prefabs and resources from kzb files:

  1. Open or create a Kanzi Studio project in which you want to use content from a kzb file.
  2. In the Library press Alt and right-click Project References, select Existing .kzb, select a kzb file from which you want to use content in the target project, and click Open.
    If the kzb file refers to other kzb files, you must also add the references to those kzb files.
  3. Use content from the kzb file:

Customizing and controlling prefabs from Kanzi Studio projects

In a Kanzi solution when you use prefabs from a Kanzi Studio project, you can set the content and appearance of these prefabs. You can do this by using a property type in the root node of each a prefab which you bind to the prefab content that you want to control.

To control prefabs from Kanzi Studio projects:

  1. Open or create a project and add to that project a prefab from a Kanzi Studio project. See Using prefabs and resources from Kanzi Studio projects.
    From here on this project is referred to as the target project.
  2. In the project which contains the prefab that you want to control, select the prefab and in the Properties next to the property with which you want to control the prefab click .
    Kanzi Studio creates from that property a custom property, adds it to the root of the prefab, and creates a ##Template binding to the property in the prefab root. This enables you to edit the appearance of the prefab from the root of the prefab.
    For example, if you want to control the progress bar of a music player using a property called Progress, click next to that property.
    From here on this project is referred to as the source project.
  3. In the target project, in the main menu select File > Import > Merge Project and select the Kanzi Studio project where you modified the prefab in the previous step.
  4. In the Project Merge dialog select the property type with which you want to control the prefab and click Merge.
    For example, select the Progress property.
  5. In the target project select the node you use to instantiate the prefab from the source project that you want to control and in the Properties add the property you merged.
    You can now use the property in the target project to control the prefab from the source project.

Merging content from referenced Kanzi Studio projects

When you want to bring content from referenced Kanzi Studio projects you can merge the items you need.

To merge content from referenced Kanzi Studio projects, in the Library > Project References right-click the source project from which you want to bring content and select Merge Project.
Merge Project allows you to import only the selected items to the target project. When merging you can select which project items you want to import and resolve conflicts for items that exist in both projects. Kanzi Studio merges nodes from the source project to a new prefab. Kanzi Studio creates the nodes and resources even if they exist in the target project and you have not merged it before from the same project reference (in which case it is marked as identical). See Merging projects.

See also

Tutorial: Combine Kanzi Studio projects into a single Kanzi application

Importing projects

Merging projects